<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>爱尚花坊</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/css/bootstrap.min.css">
<link rel="stylesheet" href="<%=request.getContextPath() %>/css/style.css">
<script src="<%=request.getContextPath()%>/js/jquery-3.2.1.min.js"></script>
	<script src="<%=request.getContextPath()%>/js/bootstrap.js"></script>
<style type="text/css">
		#nav {
			height: 100px;
			border-bottom: 3px #4C8FBD solid;
			margin-bottom: 1px;
		}
		#c_nav {
			height: 100px;
			width: 1000px;
			position: relative;
			left: 50%;
			margin-left: -500px;
		}
		#c_nav div {
			float: left;
		}
		#search {
			width: 700px;
			position: relative;
			left:150px; 
		}
		
</style>

</head>
<body>
	<jsp:include page="head.jsp"></jsp:include>
   <%--  <div id="nav">
    	<div id="c_nav">
    		<div id="search">
		    	<form action="<%=request.getContextPath() %>/product/fuzzy" method="post" target="reqSource_index">
		    		<input type="hidden" name="reqSource" value="${reqSource }" >
		    		<input type="text" name="name" id="in" autocomplete="off">
		    		<input type="submit" value="搜&nbsp;索" id="su">
		    	</form>
	    	</div>
    	</div>
    </div> --%>
    
    <jsp:include page="a.jsp"></jsp:include>
    <br><br>
	<div class="container" >
		<div class="row sectionTitle">
			<a  href="<%=request.getContextPath() %>/product/discountProducts/more" target="product_more"> 
				<h3>折扣商品</h3>
				<h5>了解我们最新的系列</h5>
			</a>
		</div>
		<div class="row">
			<c:forEach items="${discountProducts }" end="3" var="product">
				<div class="col-sm-3 product">
					<div class="productInner row m0">
						<div class="row m0 imgHov">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }"> 
								<img alt="" src="<%=request.getContextPath()%>/image/${product.imgs[0].name }">
								<div class="row m0 hovArea">
									<div class="row m0 proPrice">
										<i class="fas fa-usd"> </i>￥<fmt:formatNumber type="number" value="${product.price * product.discount }"></fmt:formatNumber>
									</div>
								</div>
							</a>
						</div>

						<div class="row m0 proName">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">${product.name }</a><br>
						</div>
						<div class="row m0 proBuyBtn">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">
								<button class="addToCart btn">查看详情</button>
							</a>
						</div>
					</div>
				</div>
			</c:forEach>
		</div>
	</div>

	<div class="container">
		<div class="row sectionTitle">
			<a href="<%=request.getContextPath() %>/product/featuredProducts/more" target="product_more"> 
				<h3>特色商品</h3>
				<h5>了解我们最新的系列</h5>
			</a>
		</div>
		<div class="row">
			<c:forEach items="${featuredProducts }" end="3" var="product">
				<div class="col-sm-3 product">
					<div class="productInner row m0">
						<div class="row m0 imgHov">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">
								<img alt="" src="<%=request.getContextPath()%>/image/${product.imgs[0].name }">
								<div class="row m0 hovArea">
									<div class="row m0 proPrice">
										<i class="fas fa-usd"> </i>￥<fmt:formatNumber type="number" value="${product.price * product.discount }"></fmt:formatNumber>
									</div>
								</div>
							</a>
						</div>

						<div class="row m0 proName">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">${product.name }</a>
						</div>
						<div class="row m0 proBuyBtn">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">
								<button class="addToCart btn">查看详情</button>
							</a>
						</div>
					</div>
				</div>
			</c:forEach>
		</div>
	</div>

	<div class="container">
		<div class="row sectionTitle">
			<a href="<%=request.getContextPath() %>/product/hotSaleProducts/more" target="product_more"> 
				<h3>热销商品</h3>
				<h5>了解我们最新的系列</h5>
			</a>
		</div>
		<div class="row">
			<c:forEach items="${hotSaleProducts }" end="3" var="product">
				<div class="col-sm-3 product">
					<div class="productInner row m0">
						<div class="row m0 imgHov">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">
								<img alt="" src="<%=request.getContextPath()%>/image/${product.imgs[0].name }">
								<div class="row m0 hovArea">
									<div class="row m0 proPrice">
										<i class="fas fa-usd"> </i>￥<fmt:formatNumber type="number" value="${product.price * product.discount }"></fmt:formatNumber>
									</div>
								</div>
							</a>
						</div>

						<div class="row m0 proName">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">${product.name }</a>
						</div>
						<div class="row m0 proBuyBtn">
							<a href="<%=request.getContextPath() %>/product/${product.id }/item" target="${product.id }">
								<button class="addToCart btn">查看详情</button>
							</a>
						</div>
					</div>
				</div>
			</c:forEach>
		</div>
	</div>

	

</body>
</html>